//
//  NSString+CZ.m
//  D02-音乐播放
//
//  Created by Vincent_Guo on 14-6-28.
//  Copyright (c) 2014年 vgios. All rights reserved.
//

#import "NSString+CZ.h"

@implementation NSString (CZ)

+(NSString *)getMinuteSecondWithSecond:(NSTimeInterval)time{
    
    int hour = (int)time / 3600;
    int minute = (int)time % 3600 / 60;
    int second = (int)time % 3600 % 60;
    
    if (second > 9 && minute <= 9) {
        return [NSString stringWithFormat:@"0%d:0%d:%d", hour, minute, second];
    }
    if (second > 9 && minute > 9) {
        return [NSString stringWithFormat:@"0%d:%d:%d", hour, minute, second];
    }
    if (second <= 9 && minute > 9) {
        return [NSString stringWithFormat:@"0%d:%d:0%d", hour, minute, second];
    }else {
        
        return [NSString stringWithFormat:@"0%d:0%d:0%d", hour, minute, second];
    }
}

@end
